home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Animation How-To
/
Animation How-to CD.iso
/
PLY
/
CHAPTER4
/
THREAD
/
THREAD.BAS
< prev
next >
Wrap
BASIC Source File
|
1994-01-01
|
2KB
|
62 lines
' THREAD.BAS - Twisting Ribbon Creation code
OPEN "thread.inc" FOR OUTPUT AS #1
FOR p1 = 0 TO 23
FOR p2 = 0 TO 3
var$ = RIGHT$("00" + LTRIM$(STR$(p1)), 2) + RIGHT$("00" + LTRIM$(STR$(p2)), 2)
PRINT #1, USING "define pch\ \ rotate(p# + <r, ang*thread, 0>,<0, ang, 0>)"; var$; p2 MOD 4 + 1
NEXT p2
PRINT #1,
PRINT #1, "static define ang ang+15"
PRINT #1,
FOR p2 = 4 TO 7
var$ = RIGHT$("00" + LTRIM$(STR$(p1)), 2) + RIGHT$("00" + LTRIM$(STR$(p2)), 2)
PRINT #1, USING "static define pch\ \ rotate(p# + <r, ang*thread, 0>,<0, ang, 0>)"; var$; p2 MOD 4 + 1
PRINT #1, USING "define pcha\ \ [pch\ \]"; var$; var$
PRINT #1, USING "define addl\ \ <pcha\ \[0][0]*offs,0,pcha\ \[0][2]*offs>"; var$; var$; var$
PRINT #1, USING "static define pch\ \ pch\ \+addl\ \"; var$; var$; var$
NEXT p2
PRINT #1,
PRINT #1, "static define ang ang+15"
PRINT #1,
FOR p2 = 8 TO 11
var$ = RIGHT$("00" + LTRIM$(STR$(p1)), 2) + RIGHT$("00" + LTRIM$(STR$(p2)), 2)
PRINT #1, USING "static define pch\ \ rotate(p# + <r, ang*thread, 0>,<0, ang, 0>)"; var$; p2 MOD 4 + 1
PRINT #1, USING "define pcha\ \ [pch\ \]"; var$; var$
PRINT #1, USING "define addl\ \ <pcha\ \[0][0]*offs,0,pcha\ \[0][2]*offs>"; var$; var$; var$
PRINT #1, USING "static define pch\ \ pch\ \+addl\ \"; var$; var$; var$
NEXT p2
PRINT #1,
PRINT #1, "static define ang ang+15"
PRINT #1,
FOR p2 = 12 TO 15
var$ = RIGHT$("00" + LTRIM$(STR$(p1)), 2) + RIGHT$("00" + LTRIM$(STR$(p2)), 2)
PRINT #1, USING "define pch\ \ rotate(p# + <r, ang*thread, 0>,<0, ang, 0>)"; var$; p2 MOD 4 + 1
NEXT p2
NEXT p1
FOR p1 = 0 TO 23
PRINT #1, "object {"
PRINT #1, " bezier 2, detail, 10, 10,"
FOR p2 = 0 TO 15
var$ = "pch" + RIGHT$("00" + LTRIM$(STR$(p1)), 2) + RIGHT$("00" + LTRIM$(STR$(p2)), 2)
PRINT #1, var$;
IF p2 < 15 THEN PRINT #1, ",";
NEXT p2
PRINT #1, " reflective_coral"
PRINT #1, "}";
PRINT #1,
NEXT p1
CLOSE #1